sdsbsarexporter module

class sd.api.sbs.sdsbsarexporter.SDCompressionMode

Bases: enum.Enum

Enum representing the compression mode of the data in the sbsar

Auto = 0

Slow encode/decode

Best = 1

Fast encode/decode

NoCompression = 2
class sd.api.sbs.sdsbsarexporter.SDSBSARExporter(APIContext, handle, *args, **kwargs)

Bases: sd.api.sdapiobject.SDAPIObject

Utility to export SBS Package

exportPackageToSBSAR(sdPackage: sd.api.sdpackage.SDPackage, sbsarOutputFilePath: str) → None

Export the specified SDPackage to the specified .sbsar file. The specified package will be automatically saved. If the package has not been saved already, the operation will fail

Parameters
  • sdPackage – The SDPackage to export.

  • sbsarOutputFilePath – The file path of the .sbsar file that will be generated

exportSBSFileToSBSAR(sbsFilePath: str, sbsarOutputFilePath: str) → None

Export the specified .sbs file to the specified .sbsar file.

Parameters
  • sbsFilePath – The filepath to the .sbs package to export.

  • sbsarOutputFilePath – The file path of the .sbsar file that will be generated

getClassName() → str

Returns the most specific name of the class this APIObject is

release() → None

Releases an APIObject

static sNew() → sd.api.sbs.sdsbsarexporter.SDSBSARExporter

Create a new SDSBSARExporter instance

setCompressionMode(sdCompressionMode: sd.api.sbs.sdsbsarexporter.SDCompressionMode) → None

Specify the data compression mode (See SDCompressionMode enum)

Parameters

sdCompressionMode – The value that indicates if the the data compression mode (See SDCompressionMode enum)

setExposeOutputSize(value: bool) → None

Specify if the “outputsize” parameter is exposed in the sbsar

Parameters

value – The value that indicates if the “outputsize” parameter is exposed in the sbsar

setExposePixelSize(value: bool) → None

Specify if the “pixelsize” parameter is exposed in the sbsar

Parameters

value – The value that indicates if the “pixelsize” parameter is exposed in the sbsar

setExposeRandomSeed(value: bool) → None

Specify if the “randomseed” parameter is exposed in the sbsar

Parameters

value – The value that indicates if the “randomseed” parameter is exposed in the sbsar

setIconEnabled(value: bool) → None

Specify if the icon is in the sbsar

Parameters

value – The value that indicates if the icon has to be in the sbsar